<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    .clearFloat::after {
      content: "";
      display: block;
      clear: both;
      height: 0;
      line-height: 0;
      visibility: hidden;
    }
    .clearFloat {
      zoom: 1;
    }
    a {
      text-decoration: none;
    }

    /* 浮动方式实现 */
    #nav {
      width: 100%;
      height: 50px;
      background-color: hotpink;
      line-height: 50px;
    }
    #nav > ul {
      list-style: none;
      margin-left: 100px;
    }
    #nav > ul > li {
      float: left;
      padding: 0 20px;
    }
    #nav > ul > li:hover {
      background-color: #fff;
    }
    #nav > ul > li:hover > a {
      color: #000;
    }
    #nav > ul > li > a {
      color: #fff;
    }
  </style>
</head>
<body>
  <!-- 导航栏 -->
  <div id="nav">
    <ul class="clearFloat">
      <li><a href="#">首页</a></li>
      <li><a href="#">产品说明</a></li>
      <li><a href="#">合作伙伴</a></li>
      <li><a href="#">公司简介</a></li>
      <li><a href="#">联系我们</a></li>
      <li><a href="#">关于</a></li>
    </ul>
  </div>
</body>
</html>